package com.intellagric.service.agritech;

import com.intellagric.common.pojo.LayuiDataGridResult;
import com.intellagric.common.pojo.ResponseMessage;
import com.intellagric.module.agritech.AgtSpeciesVo;
import com.intellagric.pojo.AgtSpecies;

import java.util.List;

/**
 * @Author: cwq
 * @Date: 2019/2/21 15:33
 * @Description:
 */
public interface SpeciesService {
    //增加
    ResponseMessage addSpecies(AgtSpecies species);

    //删除
    ResponseMessage deleteSpecies(String id);

    //修改
    ResponseMessage editSpecies(AgtSpecies species);

    //查询
    AgtSpecies getSpeciesById(String id);
    LayuiDataGridResult getSpeciesList();

    //通过父分类查询
    LayuiDataGridResult getSpeciesByPid(String pId);
    //查询分类信息，并生成树形数据
    LayuiDataGridResult getSpeciesTree();

    LayuiDataGridResult getSpeciesByPage(int page, int limit);

    LayuiDataGridResult getSpeciesListByVo(AgtSpeciesVo agtSpeciesVo, int page, int limit);

    List<AgtSpecies> getChild(String id, List<AgtSpecies> agtSpeciesList);
}
